<template>
	<div>
		<el-tabs v-model="activeName" @tab-click="handleClick">
			<el-tab-pane label="内地票房" name="first">
				<el-table :data="pfb" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="ReleaseTime" label="上映日期" />
					<el-table-column prop="BoxOffice" label="累计票房" width="180" />
					<el-table-column prop="AvgBoxOffice" label="平均票价" width="180" />
					<el-table-column prop="AvgAudienceCount" label="场均人次" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="影片单日票房" name="second">
				<el-table :data="pfbt" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="ReleaseTime" label="上映日期" />
					<el-table-column prop="BoxOffice" label="单日票房" width="180" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="影片单月票房" name="third">
				<el-table :data="pfbl" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="ReleaseTime" label="上映日期" />
					<el-table-column prop="BoxOffice" label="单月票房" width="180" />
					<el-table-column prop="MovieMonth" label="月份" width="180" />
					<el-table-column prop="BoxPercent" label="月度占比" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="影片排片场次" name="fourth">
				<el-table :data="pfbs" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="ReleaseTime" label="上映日期" />
					<el-table-column prop="ShowCount" label="排片场次" width="180" />
					<el-table-column prop="ShowCountPercent" label="排片占比" width="180" />
					<el-table-column prop="ShowCount_Eff" label="票房比/排片比" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="影片排片占比" name="fifth">
				<el-table :data="pfbf" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="InsertDate" label="上映日期" />
					<el-table-column prop="ShowCount" label="排片场次" width="180" />
					<el-table-column prop="ShowCountPercent" label="排片占比" width="180" />
					<el-table-column prop="ShowCount_Eff" label="票房比/排片比" />
				</el-table>比
			</el-tab-pane>
			<el-tab-pane label="最快过亿影片" name="sixth">
				<el-table :data="pfbz" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="ReleaseTime" label="上映日期" />
					<el-table-column prop="MovieDays" label="所用天数" width="180" />
					<el-table-column prop="ReleaseTime" label="累计票房" width="180" />
					<el-table-column prop="InsertDate" label="达标日期" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="周冠次数" name="seventh">
				<el-table :data="pfba" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="MovieName" label="影片名称" width="180" />
					<el-table-column prop="ReleaseTime" label="上映日期" />
					<el-table-column prop="WeekNum" label="周冠次数" width="180" />
					<el-table-column prop="SumBoxOffice" label="总票房" width="180" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="单日公映影片数量" name="eighth">
				<el-table :data="pfbd" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="ReleaseTime" label="日期" />
					<el-table-column prop="iCount" label="公映新片数量" width="180" />
					<el-table-column prop="MovieSumBoxOffice" label="新片总票房" width="180" />
					<el-table-column prop="BoxOffice_Pro" label="占单日票房比重(%)" width="180" />
					<el-table-column prop="MovieName" label="冠军影片" />
				</el-table>
			</el-tab-pane>
			<el-tab-pane label="档期总票房" name="ninth">
				<el-table :data="pfbc" style="width: 100%">
					<el-table-column prop="Irank" label="排名" width="180" />
					<el-table-column prop="Festival" label="档期名称" width="180" />
					<el-table-column prop="StartDate" label="日期" />
					<el-table-column prop="BoxOffice" label="档期票房" width="180" />
					<el-table-column prop="MovieName" label="冠军影片" />
				</el-table>
			</el-tab-pane>
		</el-tabs>


	</div>
</template>

<script>
	import {
		GetPfb,GetPfbt,GetPfbl,GetPfbs,GetPfbf,GetPfbz,GetPfba,GetPfbd,GetPfbc
	} from "@/api/pfb.js"
	export default {
		data() {
			return {
				activeName: 'second',
				pfb: [],
				pfbt: [],
				pfbl: [],
				pfbs: [],
				pfbf: [],
				pfbz: [],
				pfba: [],
				pfbd: [],
				pfbc: [],
			};
		},
		methods: {
			handleClick(tab, event) {
				console.log(tab, event);
			}
		},
		created() {
			GetPfb({
				r: 0.507065016237989,
				top: 50,
				type: 0
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfb = res.data.data.table0
			})
			GetPfbt({
				r: 0.8557225022706649,
				top: 50,
				type: 1
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbt = res.data.data.table0
			})
			GetPfbl({
				r: 0.8867213201259943,
				top: 50
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbl = res.data.data.table0
			})
			GetPfbs({
				r: 0.8867213201259943,
				top: 50,
				type: 1
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbs = res.data.data.table0
			})
			GetPfbf({
				r: 0.3451493941313366,
				top: 50,
				type: 1
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbf = res.data.data.table0
			})
			GetPfbz({
				r: 0.8965875361918572,
				top: 50,
				type: 1
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbz = res.data.data.table0
			})
			GetPfba({
				r: 0.6206577260643404,
				top: 50
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfba = res.data.data.table0
			})
			GetPfbd({
				r: 0.9451227024718845,
				top: 50
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbd = res.data.data.table0
			})
			GetPfbc({
				r: 0.5258154751703796,
				top: 50,
				type: 1
			}).then(res => {
				console.log(res.data.data.table0);
				this.pfbc = res.data.data.table0
			})
		}
	};
</script>

<style>
</style>
